/**
 * Created by XianTao on 2016/11/11
 * <p/>
 * Copyright (c) 2015-2015
 * Apache License
 * Version 2.0, January 2004
 * http://www.apache.org/licenses/
 */
package org.lego.biz.wechat.lechuan.mobile.api.handler;

import org.lego.wechat.base.msg.in.InMsg;
import org.lego.wechat.base.msg.out.OutMsg;
import org.lego.wechat.base.msg.out.OutTextMsg;
import org.lego.wechat.portal.service.AbstractWechatHandler;
import org.lego.wechat.portal.service.WechatHandler;
import org.springframework.stereotype.Service;

@Service
public class DefaultHandler extends AbstractWechatHandler {
    public boolean isMatch(InMsg inMsg) {
        return true;
    }

    public int getPriority() {
        return Integer.MAX_VALUE;
    }

    public OutMsg process(InMsg inMsg) {
        // 默认应答
        OutTextMsg outTextMsg = new OutTextMsg(inMsg);
        outTextMsg.setContent("亲，感谢您的关注！请点击下方菜单栏目选择相应服务，或添加小编微信（Hplcgs）交流。祝您生活愉快！");
        return outTextMsg;
    }

    public WechatHandler getMyself() {
        return this;
    }
}
